<template>
  <el-icon @click="handleCollapse">
    <Fold v-if="!isCollapse"/>
    <Expand v-else/>
  </el-icon>
</template>

<script lang="ts" setup>
import { useStore } from "@/stores";
import { Fold ,Expand} from "@element-plus/icons-vue";
import { computed } from "vue";

const store = useStore();

const isCollapse = computed(() => {
  return store.state.isCollapse ;
});

const handleCollapse = () => {
  store.commit("setIsCollapse", !store.state.isCollapse);
};
</script>

<style lang="scss" scoped></style>
